<template>
	<view>
		<view class="goods-view">
			<view class="goods-info flex-row-center">
				<image :src="goods.img" class="img-goods" mode="aspectFill"></image>
				<view class="goods-info-right flex-col">
					<view class="goods-text">{{ goods.name }}</view>
					<view class="flex-row-between">
						<view class="price-view">
							¥
							<text class="text-price">{{ goods.price }}</text>
						</view>
						<!-- <view class="shuliang">x{{ num }}</view> -->
					</view>
				</view>
			</view>
		</view>

		<view style="height: 98rpx;"></view>

		<view class="bottom-view flex-col">
			<view class="buy-agreement flex-row-center">
				<image v-if="agree" :src="`${$getImgUrl('home/ic_xz.png')}`" mode="widthFix" class="img-choose" @click="agree = !agree"></image>
				<image v-else :src="`${$getImgUrl('home/ic_xz1')}`" mode="widthFix" class="img-choose" @click="agree = !agree"></image>
				<view class="buy-text">
					我已满18岁，已阅读并同意
					<text @click="toAgreement(1)">《用户协议》</text>
				</view>
			</view>
			<button type="default" class="default-btn" @click="onPay">去支付</button>
		</view>

		<uni-popup ref="animate" type="center">
			<view class="animate-box">
				<image :src="$getImgUrl('home/bg.png')" mode="aspectFill" class="img-bg"></image>
				<view class="click-view flex-col-center">
					<image :src="$getImgUrl('home/open.png')" mode="widthFix" class="img-dianji" @longpress="onRecharge"></image>
					<view class="animate-text">按住召唤阵，并虔诚祈愿</view>
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script src="./submit.js"></script>

<style lang="scss">
@import '@/style/common.scss';
@import './submit.scss';
</style>
